361050a6b9f85996c984a4b9c7a87fc987e1363e,protocol-dns/src/main/java/org/apache/directory/server/dns/store/jndi/operations/GetFlatRecord.java,GetFlatRecord,getRecord,#Attributes#,114

Before Change


        String dnsName = ( attr = attrs.get( DnsAttribute.NAME ) ) != null ? ( String ) attr.get() : null;
        String dnsType = ( attr = attrs.get( DnsAttribute.TYPE ) ) != null ? ( String ) attr.get() : null;
        String dnsClass = ( attr = attrs.get( DnsAttribute.CLASS ) ) != null ? ( String ) attr.get() : null;
        String dnsTtl = ( attr = attrs.get( DnsAttribute.TTL ) ) != null ? ( String ) attr.get() : null;

        modifier.setDnsName( dnsName );
        modifier.setDnsType( RecordType.valueOf( dnsType ) );

After Change


     * @return the entry for the question
     * @throws NamingException if there are any access problems
     */
    private ResourceRecord getRecord( Attributes attrs ) throws NamingException
    {
        ResourceRecordModifier modifier = new ResourceRecordModifier();

        String dnsName = getAttrOrNull( attrs, DnsAttribute.NAME );
        String dnsType = getAttrOrNull( attrs, DnsAttribute.TYPE );
        String dnsClass = getAttrOrNull( attrs, DnsAttribute.CLASS );
        String dnsTtl = getAttrOrNull( attrs, DnsAttribute.TTL );

        modifier.setDnsName( dnsName );
        modifier.setDnsType( RecordType.valueOf( dnsType ) );